package top.ashman.demo.springcloud.feign.client.eurekaclient;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author sunzhaojie
 * @date 2018-12-05
 */
@FeignClient(name = "eureka-client", path = "/my", fallback = EurekaClientFeignClientFallback.class)
public interface EurekaClientFeignClient {

    /**
     * Hello
     *
     * @return Hello World
     */
    @GetMapping("/hello")
    String hello();

    /**
     * Sleep and hello
     *
     * @param seconds Seconds to sleep
     * @return Hello World
     * @throws InterruptedException InterruptedException
     */
    @GetMapping("/sleep/{seconds}")
    String sleepAndHello(@PathVariable Long seconds) throws InterruptedException;
}
